<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
        <title></title>

        <link rel="stylesheet" type="text/css" href="css/style.css" media="all" />

<!--<script type="text/javascript"-->
        <!--src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>-->
        <script type="text/javascript"
        src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"></script>
        <script type="text/javascript" src="js/jquery.inputfocus-0.9.min.js"></script>
        <script type="text/javascript" src="js/jquery.main.js"></script>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    </head>
    <body>
        <?php
        session_start();

// What languages do we support
        $available_langs = array(
            'en',
            'vn'
        );

// Set our default language session
        $_SESSION ['lang'] = isset($_SESSION ['lang']) ? $_SESSION ['lang'] : "en";
        if (isset($_GET ['lang']) && $_GET ['lang'] != '') {
            // check if the language is one we support
            $stmlang = strtolower($_GET ['lang']);
            if (in_array($stmlang, $available_langs)) {
                $_SESSION ['lang'] = $stmlang; // Set session
            }
        }
// Include active language
        include ('languages/' . $_SESSION ['lang'] . '.php');
// echo 'languages/' . $_SESSION ['lang'] . '.php';
        ?>
        <div id="container">
            <form action="abc" method="post" id="abca">


                <!-- 			Main1 ------------------------------------------------------------------------------------ -->
                <div id="Main1">
                    <h1>
                        <?php echo $lang["Title"]; ?>
                    </h1>
                    <script type="text/javascript">
                        function check(){
                            var err=true;
                            var value = $('#search').val();
                            if (value.length < 4 ) {
                                $('#search').addClass('error');
                                $('#search').effect("shake");
                                err=false;
                            } else {
                                $('#search').addClass('valid');
                            }
                            if(err){
                                $.post("process/Search.php", {
                                    id:value
                                })
                                .done(function(data) {
                                    alert("Data Loaded: " + data);
                                    $('#Main-Return').slideDown();
                                    $('#Main1').slideUp();
                                });
                            }
                        }
                        function avance(){
                            $('#Main2').slideDown();
                            $('#Main1').slideUp();
                        }                        
                    </script>
                    <div class="form">

                        <input type="text" style=""
                               name="search" 
                               id="search" 
                               value="30X9-99999" />
                        <input class="submit" type="button" onclick="check();"
                               name="Search" id="Search" value="<?php echo $lang["btnS"]; ?>" />

                        <input class="submit" type="button" onclick="avance();"
                               name="next-Avance"
                               id="next-Avance" 
                               value="<?php echo $lang["btnA"]; ?>" />

                        <label class="lblS"><?php echo $lang["Note1"]; ?></label> 
                    </div>
                    <div class="clear"></div>


                </div>

                <div class="clear"></div>


                <!-- 			Main2 ------------------------------------------------------------------------------------ -->
                <div id="Main2">
                    <h1><?php echo $lang["Title"]; ?></h1>

                    <input class="submit" type="submit" name="submit_third"
                           id="submit_third" value="" />
                </div>
                <div class="clear"></div>


                <!-- 			Return ------------------------------------------------------------------------------------ -->
                <div id="Main-Return">
                     <h1><?php echo $lang["Title"]; ?></h1>

                    <div class="form">
                        <h2>Summary</h2>

                        <table>
                            <tr>
                                <td>Username</td>
                                <td></td>
                            </tr>
                            <tr>
                                <td>Password</td>
                                <td></td>
                            </tr>
                        </table>
                    </div>

                    <div class="clear"></div>
                    <input class="send submit" type="submit" name="submit_fourth"
                           id="submit_fourth" value="" />
                </div>

            </form>
        </div>
    </body>
</html>